<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>SkyGameEngine2d: C:/code/SkyGameEngine2d/src/node/Node.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="shpe.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">SkyGameEngine2d
   &#160;<span id="projectnumber">1.0.3</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li><li class="navelem"><a class="el" href="dir_18ae7af74d885898b85cbb543ae51b63.html">node</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">Node.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">    Copyright (C) 2019 Zongming Liu &lt;1849059316@qq.com&gt;</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">    This program is free software; you can redistribute it and/or modify</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">    it under the terms of the GNU General Public License as published by</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">    the Free Software Foundation; either version 2 of the License, or</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">    (at your option) any later version.</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment">    This program is distributed in the hope that it will be useful,</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment">    but WITHOUT ANY WARRANTY; without even the implied warranty of</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment">    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment">    GNU General Public License for more details.</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"></span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment">    You should have received a copy of the GNU General Public License along</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">    with this program; if not, write to the Free Software Foundation, Inc.,</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">    51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">*/</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;</div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="preprocessor">#ifndef Node_h__</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="preprocessor">#define Node_h__</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;</div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#include &quot;../base/Object.h&quot;</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#include &quot;../base/Vector.h&quot;</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#include &quot;../base/Types.h&quot;</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#include &quot;../base/Matrix.h&quot;</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#include &quot;../base/Size.h&quot;</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#include &quot;../utility/MacroTool.h&quot;</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#include &quot;../utility/SmartPtrDef.h&quot;</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;<span class="preprocessor">#include &quot;../action/IActableObject.h&quot;</span></div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;list&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;string&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &lt;memory&gt;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &lt;functional&gt;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">namespace </span>SkyEngine2d</div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;{</div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;</div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;    <span class="keyword">class </span>Render;</div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;    <span class="keyword">class </span>Camera;</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;    <span class="keyword">class </span>ActionManager;</div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    <span class="keyword">class </span>Action;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;    <span class="keyword">class </span>GameWorld;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;    <span class="keyword">class </span>NodeProxy;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_node.html">   49</a></span>&#160;    <span class="keyword">class </span>SGE_API <a class="code" href="class_sky_engine2d_1_1_node.html">Node</a></div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;        :<span class="keyword">public</span> <a class="code" href="class_sky_engine2d_1_1_i_movable_object.html">IMovableObject</a>, <span class="keyword">public</span> <a class="code" href="class_sky_engine2d_1_1_object.html">Object</a>&lt;Node&gt;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    {</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;        NODE_CLASS(<a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>)</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;        <span class="keyword">static</span> <a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>* create(<a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>* parent);</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        <span class="keyword">virtual</span> ~<a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>();</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div><div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_node.html#a5266b3fb9b474001a381d48560828423">   69</a></span>&#160;        <span class="keywordtype">bool</span> <a class="code" href="class_sky_engine2d_1_1_node.html#a5266b3fb9b474001a381d48560828423">isVisible</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_visible; }</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00076"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_node.html#aa8d9ca86a6375a202ee6fc0e76c97965">   76</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_node.html#aa8d9ca86a6375a202ee6fc0e76c97965">setVisible</a>(<span class="keywordtype">bool</span> visible) { m_visible = visible; }</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;</div><div class="line"><a name="l00082"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_node.html#a31d4346aec635fa76ebe07fbf162dc29">   82</a></span>&#160;        int32_t <a class="code" href="class_sky_engine2d_1_1_node.html#a31d4346aec635fa76ebe07fbf162dc29">getLocalZOrder</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> m_localZOrder; }</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;        <span class="keywordtype">void</span>  setLoacalZOrder(int32_t z);</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;</div><div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;</div><div class="line"><a name="l00095"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_node.html#aaffd089457087d0efcc9f3d5db09339b">   95</a></span>&#160;        int32_t <a class="code" href="class_sky_engine2d_1_1_node.html#aaffd089457087d0efcc9f3d5db09339b">getGlobalZOrder</a>()<span class="keyword">const </span>{ <span class="keywordflow">return</span> m_globalZOrder; }</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;        <span class="keywordtype">void</span> setGlobalZOrder(int32_t z);</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> movePosition(<span class="keywordtype">float</span> dt_x, <span class="keywordtype">float</span> dt_y);</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;</div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> movePosition(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; dt_pos);</div><div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;</div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPosition(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> y);</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> setPosition(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; new_pos) <span class="keyword">override</span>;</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        <span class="keywordtype">void</span> setAnchorPoint(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; anchor);</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;        <span class="keywordtype">void</span> setContentSize(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; content_size);</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;        <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a>&amp; getContentSize()<span class="keyword">const</span>;</div><div class="line"><a name="l00155"></a><span class="lineno">  155</span>&#160;</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> setRotationR(<span class="keywordtype">float</span>  radian);</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> setRotationA(<span class="keywordtype">float</span> angle);</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> setScalingX(<span class="keywordtype">float</span> sx);</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno">  179</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> setScalingY(<span class="keywordtype">float</span> sy);</div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>  getPosition()<span class="keyword">const override</span>;</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;        <span class="keywordtype">float</span> getRoattionR()<span class="keyword">const</span>;</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;        <span class="keywordtype">float</span> getRoattionA()<span class="keyword">const</span>;</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;        <span class="keywordtype">float</span>  getScalingX()<span class="keyword">const</span>;</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;        <span class="keywordtype">float</span>  getScalingY()<span class="keyword">const</span>;</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;        <span class="keywordtype">bool</span> isChangeTransformMat()<span class="keyword">const</span>;</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_camera.html">Camera</a>* getCamera()<span class="keyword">const</span>;</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;        <span class="keywordtype">void</span> setCamera(<a class="code" href="class_sky_engine2d_1_1_camera.html">Camera</a>* c, <span class="keywordtype">bool</span> is_recursion = <span class="keyword">true</span>);</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;        <span class="keywordtype">bool</span> runAction(ActionSharedPtr action);</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;        <span class="keywordtype">void</span> stopActionByName(<span class="keyword">const</span> std::wstring&amp; action_name);</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;        ActionSharedPtr getActionByName(<span class="keyword">const</span> std::wstring&amp; name);</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;        <span class="keywordtype">void</span> installListenerAtPosChangeBefore(<span class="keyword">const</span> std::function&lt;<span class="keywordtype">void</span>(<a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; future_position)&gt;&amp; call_func);</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;</div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;        <span class="keywordtype">void</span> installListenerAtPosChangeAfter(<span class="keyword">const</span> std::function&lt;<span class="keywordtype">void</span>(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; old_pos, <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; now_pos)&gt;&amp; call_func);</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>(<a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>* parent);</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> init() <span class="keyword">override</span>;</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> draw(<a class="code" href="class_sky_engine2d_1_1_i_render.html">IRender</a>* render, <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_matrix4_x4.html">Matrix4X4</a>&amp; transform);</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> visit(<a class="code" href="class_sky_engine2d_1_1_i_render.html">IRender</a>* render, <span class="keywordtype">bool</span> parent_change_transfrom_mat);</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> paused();</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> resume();</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> convertToRenderCoordinate(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; v);</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;        <span class="keywordtype">void</span>  updateTransformMat(<span class="keywordtype">bool</span> prant_transformMat_is_change);</div><div class="line"><a name="l00315"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_node.html#a559f2264147ba7b7d14db2bc61d29618">  315</a></span>&#160;        <span class="keywordtype">void</span> <a class="code" href="class_sky_engine2d_1_1_node.html#a559f2264147ba7b7d14db2bc61d29618">changeTransformMat</a>() { m_isChangeTransforMat = <span class="keyword">true</span>; }</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;        <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_matrix4_x4.html">Matrix4X4</a>&amp; getParentTransformMat()<span class="keyword">const</span>;</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;    <span class="keyword">protected</span>:</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;        <span class="comment">//仿射矩阵</span></div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_matrix4_x4.html">Matrix4X4</a> m_transformMat;</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;</div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;        <span class="comment">//是否可以显示</span></div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;        <span class="keywordtype">bool</span> m_visible;</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;        int32_t m_localZOrder;</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;        int32_t m_globalZOrder;</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        <span class="keywordtype">bool</span> m_isNeedSort;</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;        <span class="comment">//位置</span></div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> m_position;</div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;        <span class="comment">//旋转  弧度</span></div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;        <span class="keywordtype">float</span>  m_rotation;</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;        <span class="comment">//缩放</span></div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;        <span class="keywordtype">float</span> m_scalingX;</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;        <span class="keywordtype">float</span> m_scalingY;</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;        <span class="comment">//相机</span></div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_camera.html">Camera</a>* m_camera;</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;        <span class="comment">//是否发生新的变换</span></div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;        <span class="keywordtype">bool</span> m_isChangeTransforMat;</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_action_manager.html">ActionManager</a>* m_actionManager;</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_game_world.html">GameWorld</a>* m_gameWorld;</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;        <span class="comment">//是否正在运行 </span></div><div class="line"><a name="l00350"></a><span class="lineno">  350</span>&#160;        <span class="keywordtype">bool</span> m_running;</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;        <span class="comment">//节点的尺寸</span></div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_size.html">Size</a> m_contentSize;</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;        <span class="comment">//节点的尺寸是否发生变化</span></div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;        <span class="keywordtype">bool</span> m_isChangeContentSize;</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        <span class="comment">//锚点在节点中的真实偏移</span></div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> m_anchorPointInContentSize;</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;        <span class="comment">//锚点 [0,1]</span></div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;        <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a> m_anchorPoint;</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;        <span class="comment">//---------------------------</span></div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;        <span class="comment">//节点的一些监控</span></div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;        <span class="comment">//-----------------------------------</span></div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        <span class="comment">//在位置改变之前</span></div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;        std::unique_ptr&lt;std::function&lt;void(<a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; position)&gt;&gt; m_onPositionChangeBefore;</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;        <span class="comment">//位置改变之后</span></div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;        <span class="keyword">using</span> FuncAtPosChangeAfter = std::function&lt;void(<span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; old_pos, <span class="keyword">const</span> <a class="code" href="class_sky_engine2d_1_1_vector2.html">Vector2</a>&amp; now_pos)&gt;;</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;        std::unique_ptr&lt;FuncAtPosChangeAfter&gt; m_onPositionChangeAfter;</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;        <span class="comment">//节点进入时</span></div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;        std::unique_ptr&lt;std::function&lt;void()&gt;&gt; m_onEnter;</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;        <span class="comment">//节点退出后</span></div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;        std::unique_ptr&lt;std::function&lt;void()&gt;&gt; m_onExit;</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    <span class="keyword">private</span>:</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;        <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_sky_engine2d_1_1_node_proxy.html">NodeProxy</a>;</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    };</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;</div><div class="line"><a name="l00381"></a><span class="lineno"><a class="line" href="class_sky_engine2d_1_1_node_proxy.html">  381</a></span>&#160;    <span class="keyword">class </span><a class="code" href="class_sky_engine2d_1_1_node_proxy.html">NodeProxy</a></div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;        :<span class="keyword">public</span> <a class="code" href="class_sky_engine2d_1_1_object_proxy.html">ObjectProxy</a>&lt;Node&gt;</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    {</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;    <span class="keyword">public</span>:</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;        <span class="comment">//在加入节点时调用</span></div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> onEnter(<a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>* target) <span class="keyword">override</span>;</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;        <span class="comment">//在移除节点时调用</span></div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> onExit(<a class="code" href="class_sky_engine2d_1_1_node.html">Node</a>* target) <span class="keyword">override</span>;</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;    };</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;</div><div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;}</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;<span class="preprocessor">#endif // Node_h__</span></div><div class="ttc" id="class_sky_engine2d_1_1_size_html"><div class="ttname"><a href="class_sky_engine2d_1_1_size.html">SkyEngine2d::Size</a></div><div class="ttdoc">尺寸</div><div class="ttdef"><b>Definition:</b> Size.h:29</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_node_html_a31d4346aec635fa76ebe07fbf162dc29"><div class="ttname"><a href="class_sky_engine2d_1_1_node.html#a31d4346aec635fa76ebe07fbf162dc29">SkyEngine2d::Node::getLocalZOrder</a></div><div class="ttdeci">int32_t getLocalZOrder() const</div><div class="ttdoc">获取局部的渲染顺序</div><div class="ttdef"><b>Definition:</b> Node.h:82</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_node_html_a559f2264147ba7b7d14db2bc61d29618"><div class="ttname"><a href="class_sky_engine2d_1_1_node.html#a559f2264147ba7b7d14db2bc61d29618">SkyEngine2d::Node::changeTransformMat</a></div><div class="ttdeci">void changeTransformMat()</div><div class="ttdoc">矩阵发生改变</div><div class="ttdef"><b>Definition:</b> Node.h:315</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_node_html_aaffd089457087d0efcc9f3d5db09339b"><div class="ttname"><a href="class_sky_engine2d_1_1_node.html#aaffd089457087d0efcc9f3d5db09339b">SkyEngine2d::Node::getGlobalZOrder</a></div><div class="ttdeci">int32_t getGlobalZOrder() const</div><div class="ttdoc">获取全局的渲染顺序</div><div class="ttdef"><b>Definition:</b> Node.h:95</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_movable_object_html"><div class="ttname"><a href="class_sky_engine2d_1_1_i_movable_object.html">SkyEngine2d::IMovableObject</a></div><div class="ttdoc">可执行位移动作的接口</div><div class="ttdef"><b>Definition:</b> IActableObject.h:50</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_camera_html"><div class="ttname"><a href="class_sky_engine2d_1_1_camera.html">SkyEngine2d::Camera</a></div><div class="ttdoc">相机</div><div class="ttdef"><b>Definition:</b> Camera.h:30</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_node_proxy_html"><div class="ttname"><a href="class_sky_engine2d_1_1_node_proxy.html">SkyEngine2d::NodeProxy</a></div><div class="ttdoc">节点的代理</div><div class="ttdef"><b>Definition:</b> Node.h:381</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_game_world_html"><div class="ttname"><a href="class_sky_engine2d_1_1_game_world.html">SkyEngine2d::GameWorld</a></div><div class="ttdoc">游戏世界</div><div class="ttdef"><b>Definition:</b> GameWorld.h:50</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_node_html_a5266b3fb9b474001a381d48560828423"><div class="ttname"><a href="class_sky_engine2d_1_1_node.html#a5266b3fb9b474001a381d48560828423">SkyEngine2d::Node::isVisible</a></div><div class="ttdeci">bool isVisible() const</div><div class="ttdoc">是否可见</div><div class="ttdef"><b>Definition:</b> Node.h:69</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_vector2_html"><div class="ttname"><a href="class_sky_engine2d_1_1_vector2.html">SkyEngine2d::Vector2</a></div><div class="ttdoc">2D向量</div><div class="ttdef"><b>Definition:</b> Vector.h:34</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_i_render_html"><div class="ttname"><a href="class_sky_engine2d_1_1_i_render.html">SkyEngine2d::IRender</a></div><div class="ttdoc">渲染接口</div><div class="ttdef"><b>Definition:</b> IRender.h:13</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_node_html"><div class="ttname"><a href="class_sky_engine2d_1_1_node.html">SkyEngine2d::Node</a></div><div class="ttdoc">游戏渲染节点</div><div class="ttdef"><b>Definition:</b> Node.h:49</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_node_html_aa8d9ca86a6375a202ee6fc0e76c97965"><div class="ttname"><a href="class_sky_engine2d_1_1_node.html#aa8d9ca86a6375a202ee6fc0e76c97965">SkyEngine2d::Node::setVisible</a></div><div class="ttdeci">void setVisible(bool visible)</div><div class="ttdoc">设置是否可见</div><div class="ttdef"><b>Definition:</b> Node.h:76</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_action_manager_html"><div class="ttname"><a href="class_sky_engine2d_1_1_action_manager.html">SkyEngine2d::ActionManager</a></div><div class="ttdoc">动作管理器</div><div class="ttdef"><b>Definition:</b> ActionManager.h:44</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_object_proxy_html"><div class="ttname"><a href="class_sky_engine2d_1_1_object_proxy.html">SkyEngine2d::ObjectProxy</a></div><div class="ttdef"><b>Definition:</b> Object.h:30</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_object_html"><div class="ttname"><a href="class_sky_engine2d_1_1_object.html">SkyEngine2d::Object</a></div><div class="ttdef"><b>Definition:</b> Object.h:51</div></div>
<div class="ttc" id="class_sky_engine2d_1_1_matrix4_x4_html"><div class="ttname"><a href="class_sky_engine2d_1_1_matrix4_x4.html">SkyEngine2d::Matrix4X4</a></div><div class="ttdef"><b>Definition:</b> Matrix.h:29</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
